<style type="text/css">
    /*
	#contenido thead tr:first-child{
		font-weight:bold;
	}
	#contenido thead tr:first-child td:last-child{
		text-align:right;
	}
	#contenido table td{
		vertical-align:text-top;
	}
	
	h2 p{
		font-size: 0.8em;
	}
	#contenido{
		font-size:7pt !important;
	}
	thead td, tfoot td, th, h2, tbody tr:last-child{
		font-weight:bold !important;
	}
	th{
		vertical-align:middle;
	}*/
</style>
<?php
$adcReporter->report(array(
        'data'=>$documentos,
        'table'=>array('width'=>'100%','border'=>0,'celpadding'=>0,'cellspacing'=>0),
        'params'=>array('date'=>$date,'titulo'=>$titulo),
        'bands'=>array(
                'pageHeader'=>array('type'=>'header','parent'=>'page', 'data'=>array(
                        '[USER.Empresa.razon_social] - [USER.CentroDist.descripcion]'=>array('align'=>'left','colspan'=>10),
                        'Fecha: [DATE]'=>array('align'=>'right','colspan'=>2) )),
                'title'=>array('type'=>'title','data'=>array(
                        'Resumen de Cr&eacute;ditos al [PARAMS.date] [PARAMS.titulo]'=>12),
                        'align'=>'center','strong'=>true,'header'=>'h2'),
                'master'=>array('type'=>'master','data'=>array(
                        '[Cliente.codigo]',
                        '[DocumentoVenta.nombre_cliente]',
                        '[DocumentoVenta.codigo_documento_id]',
                        '[DocumentoVenta.numero_documento]',
                        '[DocumentoVenta.glosa]',
                        '[DocumentoVenta.fecha_emision]',
                        '[DocumentoVenta.dias]'=>array('align'=>'center'),                        
                        '[DocumentoVenta.suma_importe_total]'=>array('align'=>'right','datatype'=>'float','default'=>0),            
                        '[DocumentoVenta.dias <= 30 ? DocumentoVenta.saldo : ""]'=>array('align'=>'right','datatype'=>'float','default'=>0),
                        '[DocumentoVenta.dias >= 31 && DocumentoVenta.dias <= 180 ? DocumentoVenta.saldo : "" ]'=>array('align'=>'right','datatype'=>'float','default'=>0),
                        '[DocumentoVenta.dias >= 181 && DocumentoVenta.dias <= 365 ? DocumentoVenta.saldo : "" ]'=>array('align'=>'right','datatype'=>'float','default'=>0),
                        '[DocumentoVenta.dias > 365 ? DocumentoVenta.saldo : ""]'=>array('align'=>'right','datatype'=>'float','default'=>0),
                ),'align'=>'left'),
                'masterHeader'=>array(
                        'type'=>'header',
                        'parent'=>'master',
                        'align'=>'center',
                        'border'=>array('bottom'=>true),
                        'data'=>array(
                            'COD.'=>array('width'=>20),
                            'CLIENTE',
                            'Cd'=>array('width'=>17),
                            'Documento'=>array(),                            
                            'CONCEPTO',
                            'Fecha'=>array('width'=>30),
                            'D'=>array('width'=>5),                            
                            'Imp.'=>array('align'=>'right', 'width'=>48),
                            '0/30'=>array('width'=>48),
                            '31/180'=>array('width'=>48),
                            '181/365'=>array('width'=>48),
                            '366/mas'=>array('width'=>48)
                        )					
                    ),
                'masterFooter'=>array('type'=>'footer','parent'=>'master','border'=>array('top'=>true),'data'=>array(
                        'Total'=>7,
                        '[str_replace(",","",BAND.master.TOTALS.8)+str_replace(",","",BAND.master.TOTALS.9)+str_replace(",","",BAND.master.TOTALS.10)+str_replace(",","",BAND.master.TOTALS.11)+str_replace(",","",BAND.master.TOTALS.12)]'=>array('align'=>'right','datatype'=>'float'),
                        '[BAND.master.TOTALS.8]'=>array('align'=>'right','datatype'=>'float'),
                        '[BAND.master.TOTALS.9]'=>array('align'=>'right','datatype'=>'float'),
                        '[BAND.master.TOTALS.10]'=>array('align'=>'right','datatype'=>'float'),
                        '[BAND.master.TOTALS.11]'=>array('align'=>'right','datatype'=>'float')					
                ),'strong'=>true),        
                'aulaGroup'=>array('type'=>'header','parent'=>'master','group'=>'[Alumno.nivel_id][Alumno.grado_id][Alumno.seccion]',
                'data'=>array(
                        '<br/>[Alumno.nivel_id] - [Alumno.grado_id] [Alumno.seccion]'=>array('colspan'=>12,'strong'=>true,'border'=>array('bottom'=>true))
                )),
                'aulaFooter'=>array('type'=>'footer','parent'=>'master','group'=>'aulaGroup','data'=>array(
                        'TOTAL '=>array('colspan'=>7,'align'=>'left'),
                        '[str_replace(",","",BAND.aulaFooter.TOTALS.8)+str_replace(",","",BAND.aulaFooter.TOTALS.9)+str_replace(",","",BAND.aulaFooter.TOTALS.10)+str_replace(",","",BAND.aulaFooter.TOTALS.11)]'=>array('align'=>'right','datatype'=>'float'),
                        '[BAND.aulaFooter.TOTALS.8]',
                        '[BAND.aulaFooter.TOTALS.9]',
                        '[BAND.aulaFooter.TOTALS.10]',
                        '[BAND.aulaFooter.TOTALS.11]'
                ),'strong'=>true,'border'=>array('top'=>true),'align'=>'right')
        )
    ));
?>